<?php
/**
 * Created by PhpStorm.
 * Adminuser: Administrator
 * Date: 2019/2/15 0015
 * Time: 下午 4:10
 */
//测试控制器
namespace app\home\controller;
use app\common\controller\BaseHome;
use app\facade\Adminuser;
use  app\common\model\Adminuser as Usermodel;
class Test  extends BaseHome
{
    public function addinfo(){
        $data=[
            'name'=>'王晔123',
            'email'=>'5068902491@qq.com',
            'phone'=>'18791792262',
            'password'=>'123abcd',
        ];
       $res= Adminuser::check($data);
       if(!$res){
           return Adminuser::geterror();
        }else{
           $Usermodel=new Usermodel();
           $Usermodel->save($data);
       }
    }
}